/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import dao.implementations.EdgeDaoMsSql;
import dao.implementations.NodeDaoMsSql;
import dao.interfaces.EdgeDao;
import engine.Edge;
import java.util.ArrayList;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 *
 * @author Johnny
 */
public class EdgeDaoTester {

    public EdgeDaoTester() {
    }

    @BeforeClass
    public static void setUpClass() throws Exception {
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
    }

    @Before
    public void setUp() {
    }

    @After
    public void tearDown() {
    }


    @Test
    public void hello() {
        EdgeDao ed = new EdgeDaoMsSql(new NodeDaoMsSql());
        ArrayList<Edge> edgeList = ed.getEdges();
        for (Edge edge : edgeList) {
            System.out.println(edge);
        }
        System.out.println();
        
        /*
        Edge newEdge = ed.addEdge(1, 13, 1, 1, 1);
        System.out.println(newEdge);
         */

        // ed.removeEdge(3);

        /*
        Edge curEdge = edgeList.get(2);
        Edge upEdge = new Edge(curEdge.getId(), Color.gray, curEdge.getStartNode(),
                edgeList.get(1).getStopNode());
        ed.updateEdge(upEdge);
         */    


        /*
        ed.addMiddleNode(3, 11);
        ed.addMiddleNode(3, 10);
        ed.addMiddleNode(3, 4);
        ed.addMiddleNode(3, 9); 
        ed.addMiddleNode(3, 13);
        ed.addMiddleNode(3, 2); */

        //ed.removeMiddleNode(3, 4);


        edgeList = ed.getEdges();
        for (Edge edge : edgeList) {
            System.out.println(edge);
        }
    }

}